package fu.capstone.hanoicityguide.business.bo.bus;

import java.util.ArrayList;

import android.content.Context;
import fu.capstone.hanoicityguide.business.model.Bus;
import fu.capstone.hanoicityguide.dataaccess.bus.BusDAO;
import fu.capstone.hanoicityguide.dataaccess.bus.BusDAOImp;

public class BusBOImp implements BusBO {

	private Context context;
	private BusDAO dao;

	public Context getContext() {
		return context;
	}

	public void setContext(Context ctx) {
		this.context = ctx;
	}

	public BusBOImp(Context ctx) {
		this.context = ctx;
		dao = new BusDAOImp(context);
	}

	@Override
	public ArrayList<Bus> listBus(String filter, String sorter) {
		// TODO Auto-generated method stub
		ArrayList<Bus> arrBus = dao.listBus(filter, sorter);
		return arrBus;
	}

	@Override
	public ArrayList<Bus> searchBus(String filter, String sorter, String keyWord) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Bus browseBus(int busID) {
		// TODO Auto-generated method stub
		Bus bus = dao.browseBus(busID);
		return bus;
	}

}
